import type { ForkOptions } from 'child_process'
import { fork } from 'child_process'
import { ProcessManager } from './manager'

export class NodeServerManager extends ProcessManager {
  constructor(modulePath: string, options?: ForkOptions) {
    const processFactory = () => fork(modulePath, options)
    super(processFactory)
    this.options = options || {}
  }

  options: ForkOptions
}
